<template>
    <div>
      <!-- Header -->
      <div class="header">新闻管理</div>
      
      <!-- Main Section (Content Area) -->
      <div class="main">
        <!-- Left Sidebar (Navigation) -->
        <div class="content left">
          <ul>
            <li><RouterLink to="/adminnewlist">新闻列表</RouterLink></li>
            <li><RouterLink to="/addnews">发布新闻</RouterLink></li>
            <li><RouterLink to="/updatenews">新闻修改</RouterLink></li>
            <li><RouterLink to="/updateinfo">账户管理</RouterLink></li>
            <li><RouterLink to="/">返回首页</RouterLink></li>
          </ul>
        </div>
  
        <!-- Right Main Content (News Management Page Content) -->
        <div class="content right">
          <div class="main-content">
            <RouterView></RouterView>
          </div>
        </div>
      </div>
    </div>
  </template>
  
  <script setup>
  // Vue 组件的逻辑部分, 如果有需要的变量、API 调用等可以在这里实现
  </script>
  
  <style scoped>
  /* Header */
  .header {
    position: absolute;
    top: 0;
    width: 100%;
    height: 50px;
    background-color: rgb(18, 19, 18);
    line-height: 50px;
    text-align: center;
    font-size: 24px;
    color: #fff;
  }
  /* Main Content */
  .main {
    display: flex;
    position: absolute;
    top: 50px;
    bottom: 40px;
    width: 100%;
  }
  
  .content {
    height: 100%;
  }
  
  .left {
    flex: 0 0 20%;
    background-color: #2dc362;
  }
  
  .left a {
    color: #fff;
    text-decoration: none;
    display: block;
    height: 45px;
    line-height: 45px;
    padding-left: 20px;
    background-color: #0edde8;
    border-bottom: 1px solid #fff;
  }
  
  .left a:hover {
    background-color: #1e5b8d;
  }
  
  .right {
    margin: 5px;
    flex: 1;
  }
  
  .main-content {
    margin-top: 10px;
    padding: 20px;
    background-color: #f4f4f4;
    border-radius: 8px;
  }
  
  /* Sidebar Navigation List */
  ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  
  ul li {
    height: 45px;
    line-height: 45px;
    background-color: #a0a0a0;
    color: #fff;
    cursor: pointer;
    border-bottom: 1px solid #fff;
  }
  
  ul li:hover {
    background-color: #1e5b8d;
  }
  </style>